package robocup.component.infotypes;

/**
 * The Ball how it is seen by the coach. The speed and position are not noisy,
 * and were directly given by the server.
 */
public class CoachBallInfo
    extends CoachVisualObjectInfo {

  /**
   * The speed in x-direction.
   */
  protected double xSpeed;

  /**
   * The speed in y-direction.
   */
  protected double ySpeed;

  /**
   * Constructs an info object of a seen ball from a coach
   * 
   * @param iCycle -
   *          the cycle, when the ball was seen
   * @param xPos -
   *          the x-positions value of the ball
   * @param yPos -
   *          the y-positions value of the ball
   * @param xSpeed -
   *          the speed in x-direction
   * @param ySpeed -
   *          the speed in y-direction
   */
  public CoachBallInfo(
      final int iCycle,
      final double xPos,
      final double yPos,
      final double xSpeed,
      final double ySpeed) {

    super(iCycle, xPos, yPos);
    this.xSpeed = xSpeed;
    this.ySpeed = ySpeed;
  }

  /**
   * @return Returns the xSpeed.
   */
  public double getXSpeed() {

    return this.xSpeed;
  }

  /**
   * @return Returns the ySpeed.
   */
  public double getYSpeed() {

    return this.ySpeed;
  }

  /**
   * Sets a new speed in x-direction
   * 
   * @param speed -
   *          the new speed x-component
   */
  public void setXSpeed(final double speed) {

    this.xSpeed = speed;
  }

  /**
   * Sets a new speed in y-direction
   * 
   * @param speed -
   *          the new speed y-component
   */
  public void setYSpeed(final double speed) {

    this.ySpeed = speed;
  }
}
